package com.windy.controller;

import com.windy.app.entity.User;
import com.windy.app.vo.Result;
import com.windy.service.IUserService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
public class UserController {

    @Resource
    private IUserService userService;

    @GetMapping("findUserByUsername")
    public Result<User> findUserByUsername(@RequestParam("username") String username){
        System.out.println(username);
        return userService.findByUserName(username);
    }
}
